/**
 * 
 */
package org.cuatrovientos.dice;

import java.util.Random;

/**
 * @author sam_e_000
 *
 */
public class Dice {

	private int side = 0;
	private boolean arrangeZero = true; 
	
	/**
	 * Constructor
	 */
	
	public Dice (){ 
		side=6;
}
	
	/**
	 * Values
	 * @param side
	 * @param arrangeZero
	 */
	
	public Dice (int side, boolean arrangeZero){
		this.arrangeZero = arrangeZero;
		this.side = side;
	}
	
/**
 * Create rollDice
 * @param side
 * @param arrangeZero
 * @return
 */
	
	public int rollDice(){
		
		if(arrangeZero=true){
			Random random=new Random();
			return random.nextInt(side);
		}
		else{
			Random random=new Random();
			return random.nextInt(side)+1;
		}
				
		}
	

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Dice myDice=new Dice(5 ,true);
		System.out.println(myDice.rollDice());
	}

}
